package com.wd.good.service.impl;

import com.wd.good.annotation.MyRetryable;
import com.wd.good.service.CommonService;
import org.springframework.stereotype.Service;

/**
 * @description: 使用注解进行重试
 * @author wangdpng
 * @date 2023/11/18 20:29
 */
@Service
public class CommonServiceErrorImpl implements CommonService {
    /**
     * 自定义注解重试
     */
    @Override
    @MyRetryable(retryTimes = 3,retryInterval = 2)
    public void doSomething() {
        System.out.println("doSomething");
        int a = 3/0;
    }


}
